//停启用状态枚举组件
import {
    MinusCircleOutlined,
    PauseCircleOutlined,
    CheckCircleOutlined,
} from '@ant-design/icons';
import { Tag } from 'antd';
const EnabledStatusEnum = (statusData) => {
    if(statusData === undefined || statusData === null){
        statusData = 'UN_KNOWN';
    }
    const STATUS_MAP = {
        UN_KNOWN: {
            title: '未知',
            color: 'default',
            icon: <MinusCircleOutlined />
        },
        ENABLED: { 
            title:'启用',
            icon: <CheckCircleOutlined />, 
            color: 'success' 
        },
        DISABLED: { 
            title: '停用',
            icon: <PauseCircleOutlined />, 
            color: 'error' 
        },
    };
    return <div><Tag icon={STATUS_MAP[statusData].icon} color={STATUS_MAP[statusData].color}>{STATUS_MAP[statusData].title}</Tag></div>
}
export default EnabledStatusEnum;